home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AEspringTemplate.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.2 KB  |  113 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //
  20. //  Creation Date:    May 27, 1997
  21. //  Author:        sw
  22. //
  23. //  Procedure Name:
  24. //    AEspringTemplate
  25. //
  26. //  Description Name;
  27. //    Creates the attribute editor controls for spring Node
  28. //
  29. //  Input Value:
  30. //    nodeName 
  31. //
  32. //  Output Value:
  33. //    None
  34. // 
  35.  
  36. global proc AEperSpringNew ( string $nodeAttr)
  37. {     
  38.     setUITemplate -pst attributeEditorTemplate;
  39.  
  40.     rowLayout -nc 1;
  41.         button -l "Component Editor" dynSpringCompEd;
  42.     setParent ..;
  43.  
  44.     setUITemplate -ppt;
  45.  
  46.     AEperSpringReplace($nodeAttr);
  47. }
  48.  
  49. global proc AEperSpringReplace ( string $nodeAttr )
  50. {     
  51.     // $nodeAttr = nodeName.attrName.
  52.     //
  53.     string $names[];
  54.     tokenize($nodeAttr, ".", $names);
  55.  
  56.     // Set the per spring  button callbacks.
  57.     //
  58.     button -e 
  59.         -c "componentEditorWindow"
  60.         dynSpringCompEd;
  61. }
  62.  
  63. //
  64. //  Procedure Name:
  65. //    AEspringTemplate
  66. //
  67.  
  68. global proc AEspringTemplate ( string $nodeName )
  69. {
  70.     editorTemplate -beginScrollLayout;
  71.         editorTemplate -beginLayout "Spring Attributes" -collapse 0;
  72.             editorTemplate -beginNoOptimize;
  73.             editorTemplate -l "Per-spring Stiffness" -addControl "useStiffnessPS";
  74.             editorTemplate -l "Per-spring Damping" -addControl "useDampingPS";
  75.             editorTemplate -l "Per-spring Rest Length" -addControl "useRestLengthPS";
  76.             editorTemplate -endNoOptimize;
  77.  
  78.             editorTemplate -addControl "stiffness";
  79.             editorTemplate -addControl "damping";
  80.             editorTemplate -addControl "restLength";
  81.             editorTemplate -addControl "end1Weight";
  82.             editorTemplate -addControl "end2Weight";
  83.             editorTemplate -addControl "count";
  84.             editorTemplate -addControl "manageParticleDeath";
  85.  
  86.             editorTemplate -suppress "objectPositions";
  87.             editorTemplate -suppress "objectVelocities";
  88.             editorTemplate -suppress "objectMass";
  89.             editorTemplate -suppress "deltaTime";
  90.         editorTemplate -endLayout;
  91.  
  92.     editorTemplate -beginLayout "Per Spring (Array) Attributes" -collapse false;
  93.             editorTemplate -callCustom
  94.                 "AEperSpringNew" 
  95.                 "AEperSpringReplace"
  96.                 "stiffnessPS";
  97.  
  98.             editorTemplate -suppress "stiffnessPS";
  99.             editorTemplate -suppress "dampingPS";
  100.             editorTemplate -suppress "restLengthPS";
  101.  
  102.     editorTemplate -endLayout;
  103.  
  104.         // include/call base class/node attributes
  105.         //
  106.         AEshapeTemplate $nodeName;
  107.  
  108.     editorTemplate -addExtraControls;
  109.     editorTemplate -endScrollLayout;
  110.  
  111. }
  112.  
  113.